package com.kata.chapter1;

/**
 * Created by Solidsnake on 2014/11/16.
 */
public class CarFactory {

    public static Car getCar(String carType) {
        Car car = null;
        if(carType.equals("BMW")) {
            car = new BMW();
        }else if (carType.equals("BenZ")) {
            car = new BenZ();
        }
        return car;
    }
}
